#include "app_common.h"


long app_common_getCurrentTimeMs(void)
{
     struct timeval tv;

     gettimeofday(&tv, NULL);

     return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);


}


/**
 * @brief 以十六进制格式打印字节数组
 */
void app_common_printHex(char *header,  char *data, int len)
{
    printf("%s: ", header);
    for (int i = 0; i < len; i++)
    {
        printf("%02x ", data[i]);
    }
    printf("\n");
}